Add OpenRouter Fusion Flash model support - #1059
Conversation
Add Fusion Flash to the OpenRouter API model picker and verify that requests send the documented model ID through the existing compatible adapter. Reference: - https://openrouter.ai/docs/guides/routing/routers/fusion-router#fast-preset-model-openrouter/fusion-flash
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR Summary by QodoAdd OpenRouter Fusion Flash model support
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe OpenRouter configuration now registers the ChangesOpenRouter Fusion Flash support
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change adds one selectable OpenRouter model and verifies that its exact identifier is sent through the existing request path. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review by Qodo
1. Preserve existing Fusion coverage
|
| { | ||
| name: 'openrouter-api', | ||
| apiMode: { groupName: 'openRouterApiModelKeys', itemName: 'openRouter_openai_o3' }, | ||
| apiMode: { groupName: 'openRouterApiModelKeys', itemName: 'openRouter_fusion_flash' }, |
There was a problem hiding this comment.
1. Preserve existing fusion coverage 🐞 Bug ⚙ Maintainability
The OpenRouter thin-adapter fixture replaces the existing openRouter_fusion case with openRouter_fusion_flash, so the test suite no longer verifies that the already-supported Fusion model resolves to and sends openrouter/fusion. Both models remain independently registered, making this a coverage regression rather than a deliberate consolidation.
Agent Prompt
## Issue description
The OpenRouter adapter fixture was changed from `openRouter_fusion` to `openRouter_fusion_flash`, which removes request-path coverage for the existing Fusion model.
## Issue Context
Both model keys remain independently registered in `src/config/index.mjs`, and the model assertion is conditional on each fixture's `expectedModel`. Preserve the original fixture and add a second OpenRouter fixture for Fusion Flash.
## Fix Focus Areas
- tests/unit/services/apis/thin-adapters.test.mjs[70-75]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Pull request overview
Adds support for the openrouter/fusion-flash model in the OpenRouter API model picker and strengthens unit coverage to ensure the selected OpenRouter model ID is propagated into the /chat/completions request body.
Changes:
- Added
openRouter_fusion_flashto theopenRouterApiModelKeyslist and defined itsModelsentry asopenrouter/fusion-flash. - Updated the OpenRouter thin-adapter unit test to select the new model and assert the outgoing request body includes the expected
modelvalue.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/unit/services/apis/thin-adapters.test.mjs | Updates the OpenRouter adapter test case to use Fusion Flash and asserts the serialized request body contains the expected model ID. |
| src/config/index.mjs | Registers the new OpenRouter model key and maps it to the openrouter/fusion-flash model value for the picker/config system. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
src/config/index.mjs: registeredopenRouter_fusion_flashinopenRouterApiModelKeysand added itsModelsentry mapping toopenrouter/fusion-flash— one row after the existingopenRouter_fusion, matching the established naming and ordering conventions.tests/unit/services/apis/thin-adapters.test.mjs: switched theopenrouter-apithin-adapter fixture toopenRouter_fusion_flashand added anexpectedModelassertion that verifies the exact model ID reaches the/chat/completionsrequest body; the assertion runs only when a fixture declares an expectation, so non-OpenRouter adapters are unaffected.
Mechanically sound: adding the key to the group array surfaces the entry in the OpenRouter picker (ModelGroups value + apiModes derived from Models), the config plumbing resolves openRouter_fusion_flash → openrouter/fusion-flash unchanged, and the new assertion pins exactly the behavior the PR claims. Full suite passes (1040/1040), and the ID matches OpenRouter's own fusion-router documentation.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Summary
openrouter/fusion-flashto the OpenRouter API model picker.Validation
npm testnpm run lintnpm run buildSummary by CodeRabbit
New Features
Tests